module.exports = app => {
    const mongoose = require('mongoose');

    //连接mongodb数据库
    mongoose.connect('mongodb://localhost:27017/element-ui');

    mongoose.connection.once("open",() => {
        console.log("数据库连接成功!");
    })
}